"""
@name : strtest
@author : wenyao
@projectname: sanchuanglianxi
"""

str1 = "My str"
str2 = "my str2"
str3 = "123"
str4 = "12一二"
str5 = "My Str"
str6 = "MYSTR"

# print("判断str1是否全为数字",str1.isdigit())
# print("判断str2是否全为数字",str2.isdigit())
# print("判断str3是否全为数字",str3.isdigit())
# print("判断str4是否全为数字",str4.isnumeric())
# print("判断str符合title写法",str1.istitle())
# print("判断str1是否只包含字母或数字",str1.isalnum())
# print("判断大写",str6.isupper())
# print("判断小写",str1.islower())
# print("判断开头",str1.startswith("My"))
# print("判断结尾",str1.endswith("str"))
#
#
# print("m出现的次数",str1.count('M'))
# print("字符位置",str1.index("tr"))
# print("find字符位置",str1.find("so"))
# print("转换字符",str1.upper())
# print("转换小写",str1.lower())
#
# str7 = "a:b:c:d"
# print("split分割字符",str1, str1.split())
# print("split分割字符",str7, str7.split(":"))
# list1 = str7.split(":")
# #连接
# # >>> a = "a""b"
# # >>> a = "c"+"d"
# # >>> a
# # 'cd'
#
# print("join连接字符",list1,"".join(list1))
str8 = "  my str8  "
# print("去除首位空格",str8.strip())
# print("填充",str1.zfill(20))
# print("填充",len(str1.zfill(20)))
#['My', 'str']  列表

#"a:b:c:d"  --> "abcd"  split -> join
# print("替换",str7,str7.replace(":",""))

# print("字符串格式化：%s 结尾"%(str8))
# print("字符串格式化: ",str8," 结尾")
print("%s %s %s"%("I","LOVE","PYTHON"))